<?php

require_once dirname(__FILE__) . '/../lib/universityGeneratorConfiguration.class.php';
require_once dirname(__FILE__) . '/../lib/universityGeneratorHelper.class.php';

/**
 * university actions.
 *
 * @package    Amman to London
 * @subpackage university
 * @author     Adel Abu-Saif <adeljas@msn.com>
 * @version    SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class universityActions extends autoUniversityActions {

    public function executeDelete_faculty($request) {
        FacultyTable::getInstance()->createQuery()->delete()->where('id = ?', $request->getParameter('id'))->execute();
        $this->redirect($request->getReferer());
    }

    public function executeUniversities_list() {


        $uni_list = UniversityTable::getInstance()->getUniversities();
        return $this->renderText(json_encode($uni_list));
    }
    
    
     public function executeListUsers($request) {

        $id = $request->getParameter('id');
       

        $this->redirect("sfGuardUser/Filter?uni_id=".$id);
    }

}
